import { Action } from '@ngrx/store';

import { Layer } from '../../models';

export enum LayerActionTypes {
    ADD_LAYER = '[Layer] Add Layer',
    REMOVE_LAYER = '[Layer] Remove Layer',
    CLEAR_LAYER = '[Layer] Clear Layer'
}

export class AddLayer implements Action {
    readonly type = LayerActionTypes.ADD_LAYER;
    constructor(public payload: Layer) {}
}

export class RemoveLayer implements Action {
    readonly type = LayerActionTypes.REMOVE_LAYER;
    constructor(public payload: string) {}
}

export class ClearLayer implements Action {
    readonly type = LayerActionTypes.CLEAR_LAYER;
}

export type LayerAction = AddLayer | RemoveLayer | ClearLayer;